package cn.dgut.training.controller;

import cn.dgut.training.annotation.LoginUser;
import cn.dgut.training.dto.user.AddressDTO;
import cn.dgut.training.entity.user.Address;
import cn.dgut.training.entity.user.Collect;
import cn.dgut.training.entity.user.User;
import cn.dgut.training.vo.CommonResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "shop-user")
public interface UserService {

    @GetMapping("/user/iDetail")
    User iGetUserById(@RequestParam("userId") Long userId);

    @PostMapping("/address/iDetail")
    Address iGetById(@RequestParam("id")Long id);

    @PostMapping("/address/iDefault")
    Address iShowDefaultAddress(@RequestParam("userId") Long userId);

    @GetMapping("/balance/create")
    CommonResponse create(@RequestParam("userId") Long userId);


    @GetMapping("/detail/{id}")
    public CommonResponse getById(@PathVariable("id") long id);

    //收藏

    @GetMapping("/collect/isCollect")
    public Integer isCollect(@RequestParam("userId") Long userId,@RequestParam("goodsId") Long goodsId);

    @PostMapping("/balance/iDeletion")
    void iDeletion(@RequestParam("userId") Long userId, @RequestParam("price") String price);
}
